package com.xyyhome.web.system.domain;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_s_user", schema = "xyyhome", catalog = "")
public class YSUser {
    private String ysuId;
    private String ysuUsername;
    private String ysuName;
    private String ysuPassword;
    private Timestamp ysuLastLoginTime;
    private String ysuGroupCode;
    private Timestamp ysuCreateTime;
    private Timestamp ysuChangeTime;
    private String ysuPhoto;
    private String ysuRemark;
    private Byte ysuState;

    @Id
    @Column(name = "ysu_id", nullable = false, length = 36)
    public String getYsuId() {
        return ysuId;
    }

    public void setYsuId(String ysuId) {
        this.ysuId = ysuId;
    }

    @Basic
    @Column(name = "ysu_username", nullable = true, length = 36)
    public String getYsuUsername() {
        return ysuUsername;
    }

    public void setYsuUsername(String ysuUsername) {
        this.ysuUsername = ysuUsername;
    }

    @Basic
    @Column(name = "ysu_name", nullable = true, length = 36)
    public String getYsuName() {
        return ysuName;
    }

    public void setYsuName(String ysuName) {
        this.ysuName = ysuName;
    }

    @Basic
    @Column(name = "ysu_password", nullable = true, length = 36)
    public String getYsuPassword() {
        return ysuPassword;
    }

    public void setYsuPassword(String ysuPassword) {
        this.ysuPassword = ysuPassword;
    }

    @Basic
    @Column(name = "ysu_last_login_time", nullable = true)
    public Timestamp getYsuLastLoginTime() {
        return ysuLastLoginTime;
    }

    public void setYsuLastLoginTime(Timestamp ysuLastLoginTime) {
        this.ysuLastLoginTime = ysuLastLoginTime;
    }

    @Basic
    @Column(name = "ysu_group_code", nullable = true, length = 36)
    public String getYsuGroupCode() {
        return ysuGroupCode;
    }

    public void setYsuGroupCode(String ysuGroupCode) {
        this.ysuGroupCode = ysuGroupCode;
    }

    @Basic
    @Column(name = "ysu_create_time", nullable = true)
    public Timestamp getYsuCreateTime() {
        return ysuCreateTime;
    }

    public void setYsuCreateTime(Timestamp ysuCreateTime) {
        this.ysuCreateTime = ysuCreateTime;
    }

    @Basic
    @Column(name = "ysu_change_time", nullable = true)
    public Timestamp getYsuChangeTime() {
        return ysuChangeTime;
    }

    public void setYsuChangeTime(Timestamp ysuChangeTime) {
        this.ysuChangeTime = ysuChangeTime;
    }

    @Basic
    @Column(name = "ysu_photo", nullable = true, length = 50)
    public String getYsuPhoto() {
        return ysuPhoto;
    }

    public void setYsuPhoto(String ysuPhoto) {
        this.ysuPhoto = ysuPhoto;
    }

    @Basic
    @Column(name = "ysu_remark", nullable = true, length = 200)
    public String getYsuRemark() {
        return ysuRemark;
    }

    public void setYsuRemark(String ysuRemark) {
        this.ysuRemark = ysuRemark;
    }

    @Basic
    @Column(name = "ysu_state", nullable = true)
    public Byte getYsuState() {
        return ysuState;
    }

    public void setYsuState(Byte ysuState) {
        this.ysuState = ysuState;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YSUser ysUser = (YSUser) o;

        if (ysuId != null ? !ysuId.equals(ysUser.ysuId) : ysUser.ysuId != null) return false;
        if (ysuUsername != null ? !ysuUsername.equals(ysUser.ysuUsername) : ysUser.ysuUsername != null) return false;
        if (ysuName != null ? !ysuName.equals(ysUser.ysuName) : ysUser.ysuName != null) return false;
        if (ysuPassword != null ? !ysuPassword.equals(ysUser.ysuPassword) : ysUser.ysuPassword != null) return false;
        if (ysuLastLoginTime != null ? !ysuLastLoginTime.equals(ysUser.ysuLastLoginTime) : ysUser.ysuLastLoginTime != null)
            return false;
        if (ysuGroupCode != null ? !ysuGroupCode.equals(ysUser.ysuGroupCode) : ysUser.ysuGroupCode != null)
            return false;
        if (ysuCreateTime != null ? !ysuCreateTime.equals(ysUser.ysuCreateTime) : ysUser.ysuCreateTime != null)
            return false;
        if (ysuChangeTime != null ? !ysuChangeTime.equals(ysUser.ysuChangeTime) : ysUser.ysuChangeTime != null)
            return false;
        if (ysuPhoto != null ? !ysuPhoto.equals(ysUser.ysuPhoto) : ysUser.ysuPhoto != null) return false;
        if (ysuRemark != null ? !ysuRemark.equals(ysUser.ysuRemark) : ysUser.ysuRemark != null) return false;
        if (ysuState != null ? !ysuState.equals(ysUser.ysuState) : ysUser.ysuState != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ysuId != null ? ysuId.hashCode() : 0;
        result = 31 * result + (ysuUsername != null ? ysuUsername.hashCode() : 0);
        result = 31 * result + (ysuName != null ? ysuName.hashCode() : 0);
        result = 31 * result + (ysuPassword != null ? ysuPassword.hashCode() : 0);
        result = 31 * result + (ysuLastLoginTime != null ? ysuLastLoginTime.hashCode() : 0);
        result = 31 * result + (ysuGroupCode != null ? ysuGroupCode.hashCode() : 0);
        result = 31 * result + (ysuCreateTime != null ? ysuCreateTime.hashCode() : 0);
        result = 31 * result + (ysuChangeTime != null ? ysuChangeTime.hashCode() : 0);
        result = 31 * result + (ysuPhoto != null ? ysuPhoto.hashCode() : 0);
        result = 31 * result + (ysuRemark != null ? ysuRemark.hashCode() : 0);
        result = 31 * result + (ysuState != null ? ysuState.hashCode() : 0);
        return result;
    }
}
